﻿
using ERP.Workflow.Designer.Domain.Shared.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Features;
using Volo.Abp.Localization;
using Volo.Abp.Validation.StringValues;
namespace ERP.Workflow.Designer.Application.Contracts;
public class ERPPermissionDefinitionProvider : PermissionDefinitionProvider
{
    public override void Define(IPermissionDefinitionContext context)
    {
        var erpGroup = context.AddGroup(WorkflowDesignerPermissions.GroupName);
        //流程管理
        var flowMmanager = erpGroup.AddPermission(WorkflowDesignerPermissions.FlowMg, L("Menu:FlowMmanager"));
        flowMmanager.AddChild(WorkflowDesignerPermissions.Designer, L("Menu:FlowDesigner"));
        flowMmanager.AddChild(WorkflowDesignerPermissions.Applicatoin, L("Menu:FlowApplicatoin"));
        //flowMmanager.AddChild(WorkflowDesignerPermissions.Instance, L("Menu:FlowInstance"));
    }

    private static LocalizableString L(string name)
    {
        return LocalizableString.Create<WorkflowDesignerResource>(name);
    }
}



